package cn.yingxd.demo.javatraining.tester.JSON;

import com.alibaba.fastjson2.JSON;

public class json {
    public static void test() {
        TestJson01 testJson01 = new TestJson01();
        testJson01.setName("test-name");
        testJson01.setAge(23);
        testJson01.setAddress("address");
        testJson01.setPhone("1234567890");
        testJson01.setSex(true);
        String jstring01 = JSON.toJSONString(testJson01);
        System.out.println("test-Json01-string:" + jstring01);

        TestJson02 testJson02 = new TestJson02();
        testJson02.setName("test-name");
        testJson02.setAge(23);
        testJson02.setAddress("address");
        testJson02.setPhone("1234567890");
        testJson02.setSex(true);
        String jstring02 = JSON.toJSONString(testJson02);
        System.out.println("test-jstring02-string:" + jstring02);

        TestJson03 testJson03 = new TestJson03();
        testJson03.setName("test-name");
        testJson03.setAge(23);
        testJson03.setAddress("address");
        testJson03.setPhone("1234567890");
        testJson03.setSex(true);
        String jstring03 = JSON.toJSONString(testJson03);
        System.out.println("test-jstring03-string:" + jstring03);

        TestJson04 testJson04 = new TestJson04();
        testJson04.setName("test-name");
        testJson04.setAge(23);
        testJson04.setAddress("address");
        testJson04.setPhone("1234567890");
        testJson04.setSex(true);
        String jstring04 = JSON.toJSONString(testJson04);
        System.out.println("test-jstring04-string:" + jstring04);
    }
}
